#include "mainwindow.h"

#include <QPluginLoader>
#include <QDebug>
#include <QVBoxLayout>
#include <QCommandLinkButton>

#include "interface/modulesfactory.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    QWidget* cen = new QWidget(this);
    setCentralWidget(cen);
    QVBoxLayout* vlayout = new QVBoxLayout(cen);
    QWidget* bottom = new QWidget(cen);
    mTab = new QTabWidget(this);

    vlayout->addWidget(mTab);
    vlayout->addWidget(bottom);

    QWidget* w;

    ModulesFactory::setSearchPath(OUT_PWD);
    w = ModulesFactory::createModule("system-rating");
    if (w) {
        mTab->addTab(w, "system-rating");
    }

    w = ModulesFactory::createModule("cleaner");
    if (w) {
        mTab->addTab(w, "cleaner");
    }

    w = ModulesFactory::createModule("antivirus");
    if (w) {
        mTab->addTab(w, "antivirus");
    }

    w = ModulesFactory::createModule("securitytools");
    if (w) {
        mTab->addTab(w, "securitytools");
    }

}

MainWindow::~MainWindow()
{

}
